# 初始化
# a = [[0]*5]
# print(a)
#
# b = [[0*5]]
# print(b)
#
# c = [[0 for i in range(5)]]
# print(c)
#
# d = [[0] for i in range(5)]
# print(d)
#
# e = [[0] * 5 for i in range(5)]
# print(e)

# 二维数组的遍历 (没有下标,没有索引)
a = [["a","b","c"],["d","e","f"],[1,2,3],[True,False,True],[None]]
# for i in a:
#     for j in i:
#         print(j)

# 从a中取3
# print(a[2][2])

# 二维数组的遍历(有下标)
# for i in range(len(a)):
#    for j in range(len(a[i])):
#        print(i,j,a[i][j])

# 蓝桥杯赛题
# 2022年第13届蓝桥杯省赛真题: 15分
# 问题描述: 给定一个N*M的矩阵A,请你统计有多少个子矩阵(最小1*1 最大N*M),
#           满足子矩阵中所有数的和不超过给定整数K
# 输入格式: 第一行包含3个整数N,M,K. 之后N行每行包含M个整数,代表矩阵A
# 输出格式: 一个整数代表答案


n,m,k = list(map(int,input().split()))
a = [[0] * m for i in range(n)]
print(a)
for i in range(n):
    res = list(map(int, input().split()))
    length = len(res)
    count = 0
    if length < m:
        count = length
    else:
        count = m
    for j in range(count):
        a[i][j] = res[j]
print(a)





















